package com.css.fxfzypg.modules.baseData.service;

import com.alibaba.fastjson.JSONObject;
import com.css.fxfzypg.base.response.RestResponse;
import com.css.fxfzypg.modules.baseData.entity.*;
import com.css.fxfzypg.modules.baseData.queryParams.SeismicSetoutQueryParams;
import com.css.fxfzypg.modules.baseData.vo.ScSeismicSetoutVO;
import com.css.fxfzypg.modules.baseData.vo.ScSeismicSetoutVO1;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface SeismicSetoutService {
    RestResponse updateSeismicSetout(ScSeismicsetout seismicSetout);
    RestResponse updateScSupplies(ScSupplies scSupplies);
    RestResponse updateScRescue(ScRescue scRescue);
    RestResponse updateScEquip(ScEquip scEquip);
    RestResponse updateScSanctuary(ScSanctuary scSanctuary);
    RestResponse updateScMedical(ScMedical scMedical);

    RestResponse saveSeismicSetout1(ScSeismicSetoutVO1 scSeismicSetoutVO1);
    RestResponse saveSeismicSetout2 (@RequestParam("type") String type, @RequestParam("provinceId") String provinceId,
                        @RequestParam("cityId") String cityId, @RequestParam("prefectureId") String prefectureId,
                        MultipartFile file);

    RestResponse saveSeismicSetout(ScSeismicsetout seismicSetout);
    RestResponse saveScSupplies(ScSupplies seismicSetout);
    RestResponse saveScRescue(ScRescue seismicSetout);
    RestResponse saveScEquip(ScEquip seismicSetout);
    RestResponse saveScSanctuary(ScSanctuary seismicSetout);
    RestResponse saveScMedical(ScMedical seismicSetout);

    JSONObject getAllSeismicSetout(SeismicSetoutQueryParams queryParams,int curPage,int pageSize);

    ScSeismicSetoutVO getSeismicSetoutById(String id);

    RestResponse getDetailsById(String id,String type,int curPage,int pageSize);

    RestResponse getDetailById(String id,String type);

    void deleteSeismicSetouts(String id,String type);

    //下载表中内容
    List<SeismicSetout> getAll();

    //导入内容
    RestResponse importExcel(String type,String scId,MultipartFile file) throws IOException;

    ScSeismicsetout findByAreaId(String areaId);

    Integer countByCounty(String province, String city, String county);
    Integer countByCity(String province, String city);
    Integer countByProvince(String province);

    Integer countByProvinceAndYear(String provinceName, String taskYear);
}
